package com.yvon.maple.cloud.api.system.feign;

import com.yvon.boot.common.result.ResponseData;
import com.yvon.maple.cloud.api.system.dto.BackendResourceDTO;
import com.yvon.maple.cloud.api.system.feign.factory.RemotePermissionFallbackFactory;
import com.yvon.maple.constants.ServiceNameConstant;
import com.yvon.maple.constants.SystemConstant;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.List;


/**
 * @author : Yvon
 * @since : 2021-11-25
 */
@FeignClient(value = ServiceNameConstant.SYSTEM_SERVICE, fallbackFactory = RemotePermissionFallbackFactory.class)
public interface PermissionFeignClient {

	String PATH = SystemConstant.Common.FEIGN_INSIDE_URL_PREFIX + "/permissions";

    /**
     * 查询后端资源
     *
     * @return ResponseData<List<BackendResourceDTO>>
     * @author : Yvon / 2021-11-25
     */
    @GetMapping({PATH + "/backendResource"})
    ResponseData<List<BackendResourceDTO>> getBackendResource();
}
